<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: Global.php 2011-03-09 08:45:41Z idris $
 * @author     Idris
 */

/**
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 */

class Vote_Form_Admin_Global extends Engine_Form {
	public function init() {
		$this->setTitle ( 'Global Settings' )->setDescription ( 'These settings affect all members and contests in your community.' );
		
		$this->addElement ( 'Radio', 'vote_approval', array ('label' => 'Vote Challenges Approval', 'description' => "VOTE_FORM_ADMIN_GLOBAL_APPROVAL_DESCRIPTION", 'multiOptions' => array (1 => 'Yes, votings need to be approved.', 0 => 'No, votings do not need to be approved.' ), 'value' => Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'vote.approval', 1 ) ) );
		
		$this->addElement ( 'Text', 'video_ffmpeg_path', array ('label' => 'Path to FFMPEG', 'description' => 'Please enter the full path to your FFMPEG installation. (Environment variables are not present)', 'value' => Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'video.ffmpeg.path', '' ) ) );
		
		$this->addElement ( 'Text', 'vote_page_count', array ('label' => 'Votings Per Page', 'description' => 'How many votings will be shown per page? (Enter a number between 1 and 999)', 'value' => Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'vote.page.count', 10 ) ) );
		
		// Add submit button
		$this->addElement ( 'Button', 'submit', array ('label' => 'Save Changes', 'type' => 'submit', 'ignore' => true ) );
	}
}